using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using DTO;
using Business_Layer;

public partial class SignUp : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        lblThongBaoLoi.Visible = false;
    }

    protected void btnSignUp_Click(object sender, EventArgs e)
    {
        CustomerDTO cus = new CustomerDTO();
        cus.UserName = txtUser.Text;
        cus.Name = txtFullName.Text;
        cus.PersonalID = txtCMND.Text;
        cus.Address = txtAddress.Text;
        cus.Password = txtPassword.Text;

        if (Customer_BUS.insert(cus))
        {
            // chuyen sang trang thong bao dang nhap
            Response.Redirect("MemberWelcome.aspx");
            return;
        }

        lblThongBaoLoi.Visible = true;
    }
}
